home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / meta-lang-faq < prev    next >
Encoding:
Internet Message Format  |  1994-04-22  |  37.0 KB

  1. Subject: Comp.Lang.ML FAQ [Monthly Posting]
  2. Newsgroups: comp.lang.ml,comp.answers,news.answers
  3. From: jgmorris@cs.cmu.edu (Greg Morrisett)
  4. Date: Thu, 21 Apr 1994 14:57:16 GMT
  5.  
  6. Archive-name: meta-lang-faq
  7. Last-modified: 1994/03/18
  8.  
  9.  
  10.          COMP.LANG.ML Frequently Asked Questions and Answers 
  11.        (compiled by Dave Berry and Greg Morrisett)
  12.  
  13. Please send corrections, additions, or comments regarding this list to
  14. comp-lang-ml-request@cs.cmu.edu.  
  15.  
  16. Changes since last month:
  17. ------------------------
  18. <none>
  19.  
  20. Contents:
  21. ---------
  22.     1. What is ML?
  23.     2. Where is ML discussed?
  24.         a. Comp.Lang.ML
  25.         b. SML-LIST
  26.         c. CAML-LIST
  27.     3. What implementations of ML are available?
  28.         a. quick summary (by machine/OS)
  29.         b. Poly/ML
  30.         c. Standard ML of New Jersey
  31.         d. Poplog ML
  32.         e. ANU ML
  33.         f. MicroML
  34.         g. sml2c
  35.         h. Caml Light
  36.         i. ML Kit Compiler
  37.     4. Unsupported SML/NJ Ports
  38.         a. MS-DOS/Windows
  39.         b. Linux
  40.         c. OS/2
  41.         5. Where can I find documentation on ML?
  42.         a. The Definition
  43.         b. Textbooks
  44.     6. Where can I find ML library code?
  45.     7. Theorem Provers and ML
  46.         8. Miscellaneous Questions
  47.         a. How do I write the Y combinator in SML?
  48.         b. Where can I find an X-windows interface to SML?
  49.         c. How do I call a C function from SML/NJ?
  50.         d. How do I fix the emacs mode to work with
  51.             emacs 19?
  52.  
  53. --------------------------------------------------------------------------
  54. 1. What is ML?
  55.  
  56.   ML (which stands for Meta-Language) is a family of advanced programming 
  57.   languages with [usually] functional control structures, strict semantics, 
  58.   a strict polymorphic type system, and parametrized modules.  It includes 
  59.   Standard ML, Lazy ML, CAML, CAML Light, and various research languages.  
  60.   Implementations are available on many platforms, including PCs, mainframes,
  61.   most models of workstation, multi-processors and supercomputers.  ML has 
  62.   many thousands of users, is taught at many universities (and is the first
  63.   programming language taught at some).
  64.  
  65. --------------------------------------------------------------------------
  66. 2. Where is ML discussed?
  67.  
  68. COMP.LANG.ML
  69. ------------
  70. comp.lang.ml is a moderated usenet newsgroup.  The topics for discussion
  71. include but are not limited to:
  72.  
  73.    * general ML enquiries or discussion 
  74.    * general interpretation of the definition of Standard ML 
  75.    * applications and use of ML 
  76.    * announcements of general interest (e.g. compiler releases)
  77.    * discussion of semantics including sematics of extensions based on ML
  78.    * discussion about library structure and content
  79.    * tool development
  80.    * comparison/contrast with other languages
  81.    * implementation issues, techniques and algorithms including extensions
  82.        based on ML
  83.  
  84. Requests should be sent to:
  85.  
  86.     comp-lang-ml@cs.cmu.edu
  87.  
  88. Administrative mail should be sent to:
  89.  
  90.     comp-lang-ml-request@cs.cmu.edu
  91.  
  92. Messages sent to the newsgroup are archived at CMU.  The archives can be
  93. retrieved by anonymous ftp from internet sites.  Messages are archived
  94. on a year-to-year basis.  Previous years' messages are compressed using
  95. the Unix "compress" command.  The current year's messages are not
  96. compressed.
  97.  
  98.     ftp pop.cs.cmu.edu
  99.     username: anonymous
  100.     password: <username>@<site>
  101.     binary
  102.     cd /usr/jgmorris/sml-archive
  103.     get sml-archive.<year>.Z
  104.     quit
  105.     zcat sml-archive.<year>.Z
  106.  
  107. (Pop's IP address is 128.2.205.205).
  108.  
  109. Individual messages can also be accessed in the directories
  110. /usr/jgmorris/mh-sml-archive/<year>-sml.
  111.  
  112. SML-LIST
  113. --------
  114. The SML-LIST is a mailing list that exists for people who cannot
  115. (or do not want to) read the Usenet COMP.LANG.ML newsgroup. 
  116. Messages are crossposted from COMP.LANG.ML to the SML-LIST and
  117. vice-versa.  You should ask to join the SML-LIST _only if_ you cannot
  118. (or do not want to) read the Usenet COMP.LANG.ML newsgroup.
  119.  
  120. To send a message to the SML-LIST distribution, address it to:
  121.  
  122.     sml-list@cs.cmu.edu
  123.  
  124. (sites not connected to the Internet may need additional routing.)
  125.  
  126. Administrative mail such as requests to add or remove names from the
  127. distribution list should be addressed to 
  128.  
  129.     sml-list-request@cs.cmu.edu
  130.  
  131.  
  132. CAML-LIST
  133. ---------
  134. The Caml language, a dialect of ML, is discussed on the Caml mailing
  135. list.  To send mail to the Caml mailing list, address it to:
  136.  
  137.     caml-list@margaux.inria.fr
  138.  
  139. Administrative mail should be addressed to:
  140.  
  141.     caml-list-request@margaux.inria.fr
  142.  
  143. ALT.LANG.ML
  144. -----------
  145. Another venue for ML-related discussion is the Netnews group
  146. alt.lang.ml, though this has seen relatively little traffic.  
  147. --------------------------------------------------------------------------
  148. 3. What implementations of ML are available and where can I find them?
  149.    (Note, this information may be out of date.)
  150.  
  151. Quick Summary:
  152.  
  153. System    full SML?  contact                        Platforms
  154. ------    ---------  ------------                 ------------------------------
  155. Poly/ML       yes       ahl@ahl.co.uk                SPARC/SUNOS, SPARC/Solaris
  156.  
  157. SML/NJ       yes     dbm@resarch.att.com             Unix/Sparc,Mips,Vax,680x0,
  158.            ftp research.att.com             I386/486,HPPA,RS/6000,
  159.                          MacOS/MacII
  160.            ftp.rz.uni-karlsruhe.de     Linux (including binaries)
  161.            ftp-os2.nmsu.edu         OS/2  (including binearies)
  162.            
  163.  
  164. PoplogML   yes       isl@integ.uucp,             VMS/Vax, Unix/Vax,Suns,Sparcs,
  165.            alim@uk.ac.sussex.cogs,       Solbourne, Sequent Symmetry,
  166.            pop@cs.umass.edu             HP M680?0, Apollo, AUX/MacII
  167.  
  168. Edinburgh  core       ftp ftp.dcs.ed.ac.uk             32-bit machines (bytecode)
  169.            ftp ftp.informatik.uni-muenchen.de PC 80386SX+
  170.  
  171. ANU ML       core    mcn@anucsd.anu.edu.au     Sun-3, Ultrix/Vax, Pyramid,
  172.                          AUX/MacII
  173.  
  174. MicroML       core    olof or mahler @cs.umu.se     PC 80286+ (bytecode)
  175.            ftp ftp.cs.umu.se
  176.  
  177. sml2c       yes       dtarditi@cs.cmu.edu         32-bit Unix machines (C code)
  178.            ftp dravido.soar.cs.cmu.edu
  179.  
  180. Caml Light coreish caml-light@margaux.inria.fr     32-bit Unix, Mac, PC 8086,
  181.            ftp ftp.inria.fr         PC 80386 (bytecode)
  182.  
  183. Kit       yes       ftp ftp.diku.dk         (Requires another SML compiler
  184.            ftp ftp.dcs.ed.ac.uk          to build binaries)
  185.  
  186. Details:
  187.                
  188. Poly/ML:
  189.     Poly/ML produces native code for SPARC systems under either
  190. SUNOS (4.1) or Solaris (2.3). A PC version is currently under
  191. development.  Poly/ML uses a persistent store and supports arbitrary
  192. precision integer arithmetic. The Motif Edition of Poly/ML comes
  193. with a make system, an X11/Xlib interface, and a OSF/Motif
  194. interface.  Non-standard extensions include concurrent processes and
  195. an associated message-passing scheme.
  196.     Poly/ML is a commercial product from Abstract Hardware Ltd.
  197. (ahl@ahl.co.uk).  The price of the Motif edition is 1250 pounds for an
  198. academic site licence or 3500 pounds per machine for commercial users.
  199. Multiple and site licences are available by negotiation.
  200.  
  201. Standard ML of New Jersey:
  202.         Standard ML of New Jersey was developed jointly at AT&T Bell
  203. Laboratories and Princeton University.  It is an open system (source
  204. code is freely available) implemented in Standard ML.  Version 0.93 of
  205. SML/NJ generates native code for 68020, SPARC, and MIPS (big and
  206. little endian), I386/486, HPPA(HP9000/700), and RS/6000 architectures
  207. under various versions of the Unix operating system (SunOS, Ultrix,
  208. Mach, Irix, Riscos, HPUX, AIX, AUX, etc.), and on the MacIntosh OS
  209. (Mac II, System 7.x, min 12MB ram).  Version 0.75 runs on the Vax
  210. under Ultrix, BSD, and Mach.
  211.     SML/NJ comes with a source-level debugger, profiler, gnu emacs
  212. interface, ML implementations of LEX, YACC, and Twig, separate compilation
  213. facilities, Concurrent ML, the eXene X Window library, and the SML/NJ
  214. library.  It runs interactively and can produce stand-alone executable
  215. applications.
  216.     Non-standard extensions include typed first-class continuations,
  217. Unix signal handling, and higher-order functors.
  218.         SML/NJ is copyrighted by AT&T but the system, including source
  219. code, is freely distributable.  It is available by anonymous ftp from
  220. research.att.com (192.20.225.2) and princeton.edu (128.112.128.1).
  221. Login as "anonymous" with your user name as password.  Put ftp in
  222. binary mode and copy the (compressed tar) files you need from the
  223. directory dist/ml (pub/ml on princeton.edu).  You only need the 93.mo.*.tar.Z 
  224. files for your machine in addition to the 93.src.tar.Z.  (You might also 
  225. want the 93.release-notes.[ps|txt], 93.tools.tar.Z, 93.doc.tar.Z, and 
  226. smlnj-lib-0.2.tar.Z files.)  Alternatively mail dbm@research.att.com.  
  227. In the UK, SML/NJ is available from the LFCS.
  228.     There are unsupported ports of SML/NJ to other platforms, including
  229. Linux, FreeBSD, OS/2, and Microsoft Windows 3.1.  See the "Unsupported SML/NJ 
  230. Ports" section for details.
  231.  
  232. Poplog ML:
  233.         Standard ML is supported as part of the Poplog system, which also
  234. provides incremental compilers for Pop-11, Common Lisp and Prolog in a
  235. common environment with shared data-structures, so that mixed language
  236. programming is possible. The integrated editor and HELP mechanism
  237. support online teaching aids.  Poplog comes with an X Windows interface.
  238.     Poplog is available for VAX+VMS, VAX+Ultrix, VAX+Bsd 4.2/3,
  239. Sun-2,3,4, Sun386i, SPARCstation, Solbourne, Sequent Symmetry (with Dynix),
  240. HP M680?0+Unix workstations and Apollo+Unix. Versions for MAC-II with A/UX,
  241. DECstation 3100 and MIPS will be available shortly.
  242.         UK educational users should contact the School of Cognitive and
  243. Computing Sciences, University of Sussex (alim@uk.ac.sussex.cogs).  People in
  244. the USA or Canada should contact Computable Functions Inc. (pop@cs.umass.edu).
  245. All others should contact Integral Solutions Ltd. (isl@integ.uucp).  UK
  246. academic prices start at 600 pounds.  Non-UK academic prices start at 1125
  247. pounds.  Commercial prices start around 2,000 pounds for an ML-only version
  248. or 7,500 pounds for the full Poplog system.
  249.  
  250. Edinburgh ML 4.0:
  251.     Edinburgh ML 4.0 is an implementation of the core language (without
  252. the module system).  It uses a bytecode interpreter, which is written in C
  253. and runs on any machine with 32 bit words, a continuous address space and
  254. a correct C compiler.  Ports to various 16 bit machines are underway.  The
  255. bytecode interpreter can be compiled with switches to avoid the buggy parts
  256. of the C compilers that we've used it with (as far as I know none of them
  257. worked correctly).  
  258.     Edinburgh ML 4.0 is available from the LFCS.  
  259.     A port to PCs with 386SX processors or better is available by FTP
  260. from ftp.informatik.uni-muenchen.de, in the file pub/sml/ibmpc/edml3864.exe.
  261. Contact Joern Erbguth (jnerbgut@cip.informatik.uni-erlangen.de) for more 
  262. information. 
  263.     Some information from Felix von Normann follows:
  264.  
  265.     There are other Edinburgh (PC-)ports of ML including an OS/2 2.x, 
  266.     an OS/2 PM and a Dos version. A new version has just been made 
  267.     ready and is available at forwiss.uni-passau.de (132.231.1.10) in
  268.     pub/ibmpc/os2/lang/sml/sml04.zip. It is about 360K long (short?).
  269.  
  270.     All 3 programs have in common (all in one .zip):
  271.        - true 32 Bit applications
  272.        - easy to install, easy to use
  273.        - As far as I know they work stable
  274.          (except the DOS version working as a Windows window
  275.          [you can use it with Windows but it crashes on *exit*])
  276.        - they don't require expensive hardware 
  277.          (and they don't need a co-processor)
  278.  
  279.     To be more specific:
  280.           OS/2 PM               OS/2                DOS    
  281.     OS    >= OS/2 2.0+ServPak   >= OS/2 2.0        >= DOS 5.0
  282.     Edit  PM, GUI,              Standard            command history
  283.           integrated editor
  284.           (cut&paste)
  285.     HW    >= 386/33, 8MB        >= 386/33 4MB       >= 386sx, 2MB
  286.           lots of MB and fast
  287.           graphics ad. recommened
  288.     Help  online                online
  289.           (+ML ref. in german)
  290.  
  291. ANU ML
  292.     ANU ML is descended from Cardelli's ML Pose 3.  It implements the
  293. core language of the standard and an old version of modules.  It incrementally
  294. compiles to native code on Sun-3, Vax/Ultrix, Pyramid and MacII/AUX.  (It
  295. is intended to standardize modules and do the port to Sun-4 in the near
  296. future.)
  297.     ANU ML has a program development system with strong support for
  298. debugging (tracing, automatic retesting etc.) and has been extended with
  299. a built-in type complex.  
  300.     ANU ML is still considered to be in beta release since exceptions
  301. have been standardized quite recently.  It is available from Malcolm Newey,
  302. CS Dept., Australian National University (mcn@anucsd.anu.edu.au) by
  303. arrangement; soon to be available by ftp.
  304.  
  305. MicroML
  306.     MicroML is an interpreter for a subset of SML that runs on IBM PCs,
  307. from the Institute of Information Processing at the University of Umea in
  308. Sweden.  It implements the core language except for records.  A 80286
  309. processor or better is recommended.
  310.     MicroML is available as an alpha-release by anonymous ftp from
  311. ftp.cs.umu.se /pub/umlexe01.uue.  There are several known bugs in the current
  312. version.  For more information contact Olof Johansson (olof@cs.umu.se) or
  313. Roger Mahler (mahler@cs.umu.se).
  314.  
  315. sml2c
  316.     sml2c is a Standard ML to C compiler.  It is based on SML/NJ and
  317. shares its front-end and most of the runtime system. sml2c is a batch
  318. compiler and compiles only module-level declarations.  It does not support
  319. SML/NJ style debugging and profiling.
  320.     sml2c is easily portable and has been ported to IBM RT, 
  321. Decstation 3100, Decstation 5000, Omron Luna 88k, sun-3, sun-4 and a 
  322. 486-based machine (running Mach).  The generated code is highly portable 
  323. and makes very few assumptions about the target machine or the C compilers 
  324. available on the target machine. The runtime system, which it shares with 
  325. the SML/NJ has several machine and operating system dependencies.  sml2c 
  326. has eliminated some of these dependencies by using portable schemes for 
  327. garbage collection and for freezing and restarting programs.
  328.     sml2c is available by anonymous ftp from dravido.soar.cs.cmu.edu
  329. (128.2.220.26). Log in as anonymous, send username@node as password.  The
  330. compressed tar file sml2c.tar.Z can be found in /usr/nemo/sml2c.  The local
  331. ftp software will allow you to change directory only to /usr/nemo/sml2c.
  332. The size of the tar file is about 3 Meg. The size of the uncompressed
  333. distribution is about 12 Meg.
  334.  
  335. Caml Light
  336.  
  337. Caml Light is a portable, bytecode interpreter for a subset of CAML, 
  338. a dialect of ML.  Some features of Caml Light include separate compilation,
  339. streams and stream parsers, ability to link to C code, and tools for
  340. building libraries and toplevel systems.  The PC versions provide
  341. line editing and the 80386 port is VCPI-compliant.
  342.  
  343. The Unix version should work on any modern workstation. We have tested
  344. it on Sun 3 and 4, DecStations, HP 9000/700 and 9000/350, IBM RS/6000,
  345. SGI Indigo, Sony News, Next cubes, and some more exotic machines.
  346. The Macintosh version is now a standalone Macintosh application, and
  347. no longer requires the Macintosh Programmer's Workshop. (Well, at
  348. least for the toplevel environment; the batch compilers still run
  349. under MPW.) The application provides some graphics primitives.
  350. The PC version still comes in two flavors, one that run on any PC, but
  351. is severely limited by the 640K barrier, and one that run on 80386 or
  352. 80486 PC's in 32 bit protected mode to circumvent these limitations.
  353. Both versions now provide the same graphics primitives as the
  354. Macintosh version.  Ports to OS/2 and to the Amiga are in progress.
  355.  
  356. The version 0.6 of the Caml Light system has been released, and is
  357. available by anonymous FTP from:
  358.  
  359.         host:      ftp.inria.fr (192.93.2.54)
  360.  
  361.         directory: lang/caml-light
  362.  
  363.     Summary of the files:
  364.  
  365.         README                  More detailed summary
  366.         cl6unix.tar.Z           Unix version
  367.         cl6macbin.sea.hqx       Binaries for the Macintosh version
  368.         cl6macsrc.sea.hqx       Source code for the Macintosh version
  369.         cl6pc386bin.zip         Binaries for the 80386 PC version
  370.         cl6pc386src.zip         Source code for the 80386 PC version
  371.         cl6pc86bin.zip          Binaries for the 8086 PC version
  372.         cl6pc86src.zip          Source code for the 8086 PC version
  373.         cl6refman.*             Reference manual, in various formats
  374.         cl6tutorial.*           Tutorial, in various formats
  375.  
  376. This release is mostly a bug-fix release and should be compatible with
  377. Caml Light 0.5. The main changes are:
  378.  
  379. * Better handling of type abbreviations.
  380.  
  381. * Debugging mode (option -g to camlc and camllight) to get access
  382.   to the internals of module implementations.
  383.  
  384. * New library modules:
  385.     genlex    generic lexical analyser
  386.     set       applicative sets over ordered types
  387.     map       applicative maps over ordered types
  388.     baltree   balanced binary trees over ordered types
  389.  
  390. * "compile" command at toplevel (especially useful in the Macintosh version).
  391.  
  392. * New contributed libraries and tools:
  393.     camlmode    Emacs editing mode for Caml Light
  394.     mletags     Indexing of Caml Light source files for use with Emacs "tags"
  395.     search_isos Search libraries by types (modulo isomorphisms)
  396.     libgraph    X implementation of the portable graphics library
  397.     libnum      Arbitrary-precision arithmetic
  398.     libstr      String operations, regular expressions
  399.  
  400. * The 80386 PC version is now DPMI-compliant, hence it can run under Windows
  401.   (in text mode inside a DOS windows and with no graphics, though).
  402.  
  403. * More examples, including those from the book "Le langage Caml".
  404.  
  405. General questions and comments of interest to the Caml community
  406. should be sent to caml-list@margaux.inria.fr, the Caml mailing list.
  407. (see question 3 above for details.)
  408.  
  409. ML Kit Compiler
  410.  
  411.   The ML Kit is a straight translation of the Definition of Standard
  412. ML into a collection of Standard ML modules.  For example, every
  413. inference rule in the Definition is translated into a small piece of
  414. Standard ML code which implements it. The translation has been done
  415. with as little originality as possible - even variable conventions
  416. from the Definition are carried straight over to the Kit.
  417.  
  418.   If you are primarily interested in executing Standard ML programs
  419. efficiently, the ML Kit is not the system for you! (It uses a lot of
  420. space and is very slow.) The Kit is intended as a tool box for those
  421. people in the programming language community who may want a
  422. self-contained parser or type checker for full Standard ML but do not
  423. want to understand the clever bits of a high-performance compiler. We
  424. have tried to write simple code and module interfaces; we have not
  425. paid any attention to efficiency.
  426.  
  427.   The documentation is around 100 pages long and is provided with the
  428. Kit. It explains how to build, run, read and modify the Kit. It also
  429. describes how typing of flexible records and overloading are handled
  430. in the Kit.
  431.  
  432.   The ML Kit is written by Nick Rothwell, David N. Turner, Mads Tofte
  433. and Lars Birkedal at Edinburgh and Copenhagen Universities.
  434.    
  435.   The ML Kit is available via anonymous ftp. Here is a sample dialog:
  436.  
  437.   ftp ftp.diku.dk              ftp ftp.dcs.ed.ac.uk
  438.   Name: anonymous              Name: anonymous
  439.   Password: <your loginname@host>      Password: <your loginname@host>
  440.   ftp> binary                  ftp> binary
  441.   ftp> cd diku/users/birkedal          ftp> cd export/ml/mlkit
  442.   ftp> get README              ftp> get README
  443.   ftp> get COPYING              ftp> get COPYING
  444.   ftp> get src.tar.Z              ftp> get src.tar.Z
  445.   ftp> get doc.tar.Z              ftp> get doc.tar.Z
  446.   ftp> get tools.tar.Z          ftp> get tools.tar.Z
  447.   ftp> get examples.tar.Z          ftp> get examples.tar.Z
  448.   ftp> bye                  ftp> bye
  449.  
  450. The file README contains installation instructions. Note that no
  451. binaries are distributed and that you must build these using either
  452. Standard ML of New Jersey, or Poly/ML.
  453.  
  454.  
  455. --------------------------------------------------------------------------
  456. 6. Unsupported SML/NJ Ports
  457.  
  458. This section describes various ports of SML/NJ (see section 5) 
  459. that are not directly supported by the NJ folks.  
  460.  
  461. MS-DOS/Windows?
  462. ---------------
  463. (From Dave MacQueen)
  464.  
  465. There is an MS-Windows/MSDOS implementation of Standard ML of New
  466. Jersey available by annonymous ftp on research.att.com, directory
  467. dist/ml/working/sml-386.  This port was done by Yngvi Guttesen at the
  468. Danish Technical University in Copenhagen, and it is based on version
  469. 0.75 of SML/NJ.  The distribution consists of the following four
  470. files.
  471.  
  472. -rw-rw-r--  1  dbm     other    417 Feb 16  1993 README
  473. -rw-rw-r--  1  dbm     other  51375 Feb  7  1992 doc.tar.Z
  474. -rw-rw-r--  1  dbm     other 749105 May  5  1992 mo.386.tar.Z
  475. -rw-rw-r--  1  dbm     other 851445 Feb  7  1992 src.tar.Z
  476.  
  477. This Windows port is rather delicate, and when we got it we had a lot
  478. of trouble getting it working here at Bell labs.  We tried several
  479. different machines and finally found one on which it would run (a
  480. Gateway 2000 with 16 MB of RAM), though even then it was not very
  481. robust or fast.  It seemed to be a problem of finding a machine with
  482. just the right memory management configuration.  I must admit that
  483. memory management under Windows is a black art that I am not familiar
  484. with, so I have no idea how to characterize the required memory
  485. configuration.
  486.  
  487. My conclusion is that the current Windows 3.1/MSDOS environment is so
  488. difficult that it would require a major additional investment to have
  489. a really useful port.  Guttesen did not have a 32 bit C compiler
  490. available, so he rewrote the runtime system in assember, which makes
  491. it difficult to modify his port.  An alternative is to wait for
  492. Windows NT (Win32) or OS/2 ports, which may be done in the coming
  493. months (a couple of people have independently been working on OS/2
  494. ports recently).  Another alternative is to look in directory pub/ml
  495. of ftp.dcs.ed.ac.uk, where there are a couple of (partial)
  496. implementations of SML that run on PCs.  A third alternative is to
  497. look into Xavier Leroy's CAML Light.  (Details of these are in the
  498. comp.lang.ml FAQ message.)
  499.  
  500. However, Guttesen's 386 code generator was used by Mark Leone of CMU
  501. as the basis for a port to Unix on Ix86 machines.  The current release
  502. of SML of New Jersey (0.93) incorporates Intel/Unix support for Mach
  503. (used at Carnegie-Mellon University), BSD386 (a product of BSDI?), and
  504. 386bsd (a free version of Unix for the PC).  There are also versions
  505. that run under Linux (available as part of the free Linux distribution)
  506. and SVR4, although we have not yet integrated the code supporting
  507. Linux and SVR4 into the distributed 0.93 runtime system.  Interest has
  508. been expressed in a port for SCO Unix, but, as far as we know, no one
  509. has done such a port.
  510.  
  511. Very recently Peter Bertelsen of the Technical University of Denmark
  512. has done a port to OS2, which is now available on research.att.com,
  513. directory dist/ml.
  514.  
  515. Linux?
  516. ------
  517. (Thanks to Ralf Reetz, Peter Su, and Mark Leone)
  518.  
  519. Various ftp sites that seem to carry SML/NJ version 0.93 for Linux:
  520.  
  521.     ftp.rz.uni-karlsruhe.de:/linux/mirror.tsx/
  522.  
  523.         binaries/usr.bin/njsml.93.bin.z
  524.         sources/usr.bin/njsml.93.linux.README
  525.         sources/usr.bin/njsml.93.linux.README.NEW
  526.         sources/usr.bin/njsml.93.linux.diffs.z
  527.         sources/usr.bin/njsml.93.src.tar.z
  528.  
  529.     ftp@tsx-11.mit.edu:/pub/linux/
  530.  
  531.            sources/usr.bin/njsml.93.src.tar.z
  532.  
  533.     ftp.dcs.glasgow.ac.uk?
  534.  
  535. From the README file:
  536.  
  537.              Standard ML of New Jersey
  538.     Version 0.93 for the i386/i486 running Linux, April 23, 1993
  539.  
  540.  
  541. __ WHAT
  542.     SML/NJ is a compiler for the functional programming language
  543.     Standard ML (SML). It is a fairly complete and robust
  544.     implementation of ML.
  545.  
  546. __ FILES
  547.     njsml.93.bin.z - gzip'd binary of njsml (no SourceGroup)
  548.     njsml-sg.93.bin.z - gzip'd binary of njsml with SourceGroup
  549.     njsml.93.src.tar.z - minimal sources for NJSML on Linux
  550.     njsml.93.mo.i386.z - you'll need these also to compile on Linux
  551.  
  552.     You can pick up additional tools and goodies from:
  553.  
  554.     research.att.com
  555.  
  556.     under the "ml" directory.
  557.  
  558. __ HISTORY
  559.  
  560.     This is a port of Standard ML of New Jersey (SML/NJ) to Linux. It
  561.     is based on the work of Mark Leone (mleone@cs.cmu.edu) who did
  562.     the port for i386/i486 machines. The current binary was compiled
  563.     using Linux 0.99.7a.  Shared lib 4.3.3.
  564.  
  565.     This port was done by Sanford Barr (sbarr@cs.sunysb.edu) based on
  566.         the original port of 0.91 by Hermano Moura (moura@dcs.glasgow.ac.uk)
  567.     and Andre Santos (andre@dcs.glasgow.ac.uk).
  568.  
  569. __ RECOMMENDED ENV
  570.  
  571.     16M of ram is suggested if you wish to do anything serious with
  572.     the system.  Also, a 386-40 or better would be helpful.
  573.  
  574.  
  575. __ KNOWN BUGS AND DEFICIENCIES
  576.  
  577.     1 Some minimal precision problems exist when a 387 emulator is
  578.       used.
  579.  
  580.     2 ML functions System.Directory.listDir and System.Directory.getWD
  581.       not working at the moment.
  582.  
  583. __ WHERE
  584.  
  585.     NJ-SML 0.93 should be available at most major Linux sites.  It
  586.     should also be available in:
  587.         sbcs.sunysb.edu:/pub/linux
  588.     by the time you are reading this.
  589.  
  590. OS/2:
  591. -----
  592. Standard ML of New Jersey (version 0.93) has been ported to PC's running OS/2.
  593. Signal handling is not implemented. This port has been implemented using Mark
  594. Leone's code generator for Intel 80386 and the Unix emulator emx, copyright of
  595. Eberhard Mattes. SML/NJ is copyright of AT&T Bell Laboratories.
  596. There is no warranty of any kind!
  597.  
  598. Requirements:
  599.  - IBM OS/2 version 2.x
  600.  - HPFS file system (long file names required)
  601.  - emx version 0.8g or later
  602.  - '.mo' files for i386
  603.  
  604. The port is available for anonymous ftp from research.att.com (in /dist/ml)
  605. and, in Europe, from ftp.id.dth.dk (in /pub/bertelsen):
  606.  
  607.    93.os2port.zip     Archived with Info-ZIP's Zip utility
  608.    93.os2port.tar.Z   Archived with GNU's tape archive utility
  609.    93.os2port.txt     Port announcement & installation guide
  610.  
  611. Please note that the .tar.Z and .zip version of the SML/NJ port are exactly
  612. alike and both contain a full source set (but no '.mo' files) for compiling 
  613. to OS/2 with emx/gcc (not included).
  614.  
  615. The i386 '.mo' archive (93.mo.i386.tar.Z) is available from research.att.com
  616. (in /dist/ml) and princeton.edu (in /pub/ml). The emx environment is available
  617. from various OS/2 related ftp sites, e.g. ftp-os2.cdrom.com.
  618.  
  619. A binary-only release of this SML/NJ port (no source, interactive system
  620. executable only) is also available for anonymous ftp from ftp-os2.cdrom.com.
  621.  
  622. If you have questions concerning this port, please send email to:
  623.  
  624. Peter Bertelsen  (c917023@id.dth.dk)
  625. Department of Computer Science, Technical University of Denmark
  626.  
  627. FreeBSD:
  628. --------
  629. SML/NJ is also available in source and binary format for FreeBSD from
  630. freebsd.cdrom.com:/pub/FreeBSD/packages/sml_src.tgz and sml_bin.tgz.
  631. The binary package includes EXene and CML as well.
  632.  
  633. --------------------------------------------------------------------------
  634. 5. Where can I find documentation on SML?
  635.  
  636. THE DEFINITION.
  637.  
  638. Robin Milner, Mads Tofte and Robert Harper
  639. The Definition of Standard ML
  640. MIT, 1990.
  641. ISBN: 0-262-63132-6
  642.  
  643. Robin Milner and Mads Tofte
  644. Commentary on Standard ML
  645. MIT, 1991
  646. ISBN: 0-262-63137-7
  647.  
  648. TEXTS.
  649.  
  650. Jeffrey D. Ullman
  651. Elements of ML Programming
  652. Prentice-Hall, 1993 (Oct. 15)
  653. ISBN: 0-13-184854-2
  654. (See Comp.Lang.ML archives, message from Ullman dated 22 Sep 1993 for
  655.  chapter headings.)
  656.  
  657. Rachel Harrison
  658. Abstract Data Types in Standard ML
  659. John Wiley & Sons, April 1993
  660. ISBN: 0-471-938440
  661.  
  662. Ake Wikstrom
  663. Functional Programming Using Standard ML
  664. Prentice Hall 1987
  665. ISBN: 0-13-331661-0
  666.  
  667. Chris Reade
  668. Elements of Functional Programming
  669. Addison-Wesley 1989
  670. ISBN: 0-201-12915-9
  671.  
  672. Lawrence C Paulson
  673. ML for the Working Programmer
  674. Cambridge University Press 1991
  675. ISBN: 0-521-39022-2
  676.  
  677. Stefan Sokolowski
  678. Applicative High Order Programming: The Standard ML perspective
  679. Chapman & Hall 1991
  680. ISBN: 0-412-39240-2     0-442-30838-8 (USA)
  681.  
  682. Ryan Stansifer
  683. ML Primer
  684. Prentice Hall, 1992
  685. ISBN 0-13-561721-9
  686.  
  687. Colin Myers, Chris Clack, and Ellen Poon
  688. Programming with Standard ML
  689. Prentice Hall, 1993
  690. ISBN 0-13-722075-8 (301pp)
  691.  
  692. The following report is available from the LFCS (Lorraine Edgar,
  693. lme@dcs.ed.ac.uk) and costs 5 pounds or 10 US dollars.  It covers all of
  694. Standard ML.  The report is also available via the World Wide Web off of
  695. http://www.cs.cmu.edu:8001/afs/cs.cmu.edu/project/fox/mosaic/HomePage.html.
  696. Alternatively, the report can be ftp'd from ftp.cs.cmu.edu as the file
  697. /afs/cs/project/fox/mosaic/intro-notes.ps.
  698.  
  699. Robert Harper
  700. Introduction to Standard ML
  701. LFCS Report Series  ECS-LFCS-86-14
  702. Laboratory for Foundations of Computer Science
  703. Department of Computer Science
  704. University of Edinburgh
  705. Nov. 1986 (revised Jan. 1989 by Nick Rothwell and Kevin Mitchell)
  706.  
  707. The following report is available from the LFCS (Lorraine Edgar,
  708. lme@dcs.ed.ac.uk) and costs 2.50 pounds or 5 US dollars for single
  709. copies and 1.50 pounds or 3 dollars when bought in bulk.  It includes
  710. an introduction to Standard ML and 3 lectures on the modules system.
  711.  
  712. Mads Tofte
  713. Four Lectures on Standard ML
  714. LFCS Report Series  ECS-LFCS-89-73
  715. Laboratory for Foundations of Computer Science
  716. Department of Computer Science
  717. University of Edinburgh
  718. March 1989
  719.  
  720. The following report is available from the LFCS (Lorraine Edgar,
  721. lme@dcs.ed.ac.uk) and is free.  It introduces Extended ML, a language
  722. for writing (non-executable) specifications of Standard ML programs and
  723. for formally developing Standard ML programs from such specifications.
  724.  
  725. Don Sannella
  726. Formal program development in Extended ML for the working programmer.
  727. LFCS Report Series  ECS-LFCS-89-102
  728. Laboratory for Foundations of Computer Science
  729. Department of Computer Science
  730. University of Edinburgh
  731. December 1989
  732. --------------------------------------------------------------------------
  733. 6. Where can I find library code?
  734.  
  735. The Edinburgh SML Library provides a consistent set of functions on the
  736. built-in types of the language and on vectors and arrays, and a few extras.
  737. It includes a "make" system and a consistent set of parsing and unparsing
  738. functions.  The library consists of a set of signatures with sample portable
  739. implementations, full documentation, and implementations for Poly/ML,
  740. Poplog ML and SML/NJ that use some of the non-standard primitives
  741. available in those systems.  It is distributed with Poly/ML, Poplog ML and
  742. Standard ML of New Jersey.  It is also available from the LFCS.
  743.  
  744. The library documentation is available as a technical report from the LFCS
  745. (Lorraine Edgar, lme@dcs.ed.ac.uk) and costs 5 pounds or 10 US dollars.
  746. The LaTeX source of the report is included with the library.
  747.  
  748. Dave Berry
  749. The Edinburgh SML Library
  750. LFCS Report Series  ECS-LFCS-91-148
  751. Laboratory for Foundations of Computer Science
  752. Department of Computer Science
  753. University of Edinburgh
  754. April 1991
  755.  
  756.  
  757. The SML/NJ Library is distributed with the SML of New Jersey compiler.
  758. It provides a variety of utilities such as 2-dimensional arrays, sorting,
  759. sets, dictionaries, hash tables, formatted output, Unix path name
  760. manipulation, etc.  The library compiles under SML/NJ but should
  761. be mostly portable to other implementations.
  762.  
  763. --------------------------------------------------------------------------
  764. 7. Theorem Provers and ML
  765.  
  766. (Collected by Paul Black, pblack@cs.berekeley.edu.  Thanks Paul!)
  767.  
  768. - LCF (Edinburgh LCF and Cambridge LCF)
  769.     * written in the original Edinburgh dialect of ML from which SML developed.
  770.  
  771.    "Logic and Computation: Interactive Proof with Cambridge LCF"
  772.     also by Lawrence C. Paulson.
  773.  
  774.  
  775. - Lego (LFCS, Edinburgh Univ., SML)
  776.     * originally developed in CAML
  777.     * latest version (5) now runs under SML/NJ 
  778.     * only higher-order resolution
  779.     * available via anon. ftp from ftp.dcs.ed.ac.uk:/pub/lego
  780.  
  781. - HOL90 
  782.    Authors = Konrad Slind, Elsa Gunter
  783.    elsa@research.att.com, slind@informatik.tu-muenchen.de
  784.    http://lal.cs.byu.edu/lal/hol-documentation.html
  785.    
  786.    hol90 is a free implementation in SML/NJ of Mike Gordon's HOL logic (a
  787.    polymorphic version of Church's Simple Type Theory). The system provides
  788.    a lot of automated support including:
  789.    
  790.    - a powerful rewriting package;
  791.    - pre-installed theories for booleans, products, sums, natural
  792.      numbers, lists, and trees;
  793.    - definition facilities for recursive types and recursive functions
  794.      over those types (mutual recursion is also handled);
  795.    - extensive libraries for strings, sets, group theory, integers, the
  796.      real numbers, wellordered sets, automatic solution of goals
  797.      involving linear arithmetic, tautology checking, inductively
  798.      defined predicates, Hoare logic, Chandy and Misra's UNITY theory,
  799.      infinite state automata, and many others.
  800.  
  801.    The HOL community has a lively mailing list accessible at
  802.    info-hol-request@leopard.cs.byu.edu and a yearly user's meeting that
  803.    alternates between Europe and North America. hol90 is available by
  804.    anonymous ftp from
  805.  
  806.        machine = ftp.informatik.tu-muenchen.de
  807.      directory = local/lehrstuhl/nipkow/hol90/hol90.6.tar.Z
  808.      or
  809.        machine = research.att.com
  810.      directory = dist/ml/hol90/hol90.6.tar.Z
  811.  
  812. - NuPrl (from Bob Constable`s group at Cornell)
  813.  
  814. - Isabelle (Lawrence C. Paulson, Cambridge Univ. )
  815.     * has rewriting, but not many decision procedures.  It does has
  816.     things like model elimination-based decision procedures.
  817.     * a generic automatic theorem prover i.e. you can program it to
  818.     the logic system/proof system you want.  Already has the
  819.     following subsystems already implemented:
  820.         i) FOL - first order logic
  821.         ii) HOL - higher order logic
  822.         iii) LCF - Logic of computable functions
  823.         iv) LK - Gentzen system LK
  824.         v) Modal - Modal logic systems T, S4, S43
  825.         vi) ZF - Zermelo-Fraenkel set theory
  826.     * ftp from <gannet.cl.cam.ac.uk>
  827.  
  828. - MERILL (Brian Matthews, U. of Glasgow & Rutherford Appleton Laboratory)
  829.     * written in standard ML
  830.     * a general purpose order-sorted equational reasoning system
  831.     * Allows the user to declare their own object language, allows
  832.     AC-rewriting and AC-unification of terms and equations, has
  833.     several completion algorithms, is built on a hierarchy of
  834.     types known as Order-Sorting, and allows the user to try
  835.     different termination methods.
  836.     * available via anonymous ftp from the University of Glasgow,
  837.     ftp address: ftp.dcs.glasgow.ac.uk (130.209.240.50)
  838.     * Brian Matthews, brian@dcs.glasgow.ac.uk or bmm@inf.rl.ac.uk
  839.  
  840. - FAUST (Karlsruhe)
  841.     * a HOL add-on written in ML.
  842.     * ftp from goethe.ira.uka.de (129.13.18.22)
  843.  
  844. - Alf
  845.     * written in SML
  846.     * An implementation of Martin-Lofs type theory with dependent types
  847.     * Proof editor
  848.     * available by anonymous ftp from cs.chalmers.se
  849.     * only higher-order resolution
  850.  
  851. - Coq
  852.     * written in Caml-Light (but Caml-Light and SML are VERY similar)
  853.     * no serious automated reasoning subsystems (other than
  854.     higher-order resolution), but has a VERY nice package for
  855.     program verification.
  856.     * available via anon. ftp from ftp.inria.fr:/INRIA/coq/V5.8
  857.     * possible contact: Chet Murthy <murthy@cs.cornell.edu>
  858.  
  859. - ICLHOL/ProofPower (ICL Secure Systems)
  860.     * a commercial system using a reimplementation of HOL in SML
  861.     * contact ProofPower-server@win.icl.co.uk
  862.  
  863. - Lamdba/DIALOG (Abstract Hardware Ltd)
  864.     * a commercial tool written in Poly/ML, neither of which is free.
  865.  
  866. - Elf (Frank Pfenning, Carnegie Mellon Univ.)
  867.    * Elf is a higher-order logic programming language based on the LF
  868.     Logical Framework.
  869.    * Elf is not a theorem prover per-se, but is useful for specifying
  870.     and proving properties of programming languages, logics, and their
  871.     implementations.  A number of examples are provided with the
  872.     distribution.
  873.    * The Elf implementation is written in SML/NJ and should be easily
  874.         portable to other SML implementations.
  875.    * Elf can be ftp'd from alonzo.tip.cs.cmu.edu (128.2.209.194)
  876.     in the directory /afs/cs/user/fp/public.
  877.    * A bibliography and a collection of papers regarding LF and Elf
  878.         can be found in the directory /afs/cs/user/fp/public/elf-papers.
  879.    * There is an Elf mailing list.  Contact elf-request@cs.cmu.edu to join.
  880.    * For further information, contact Frank Pfenning (fp@cs.cmu.edu).
  881.  
  882. References
  883.    "ML for the Working Programmer" by Lawrence C. Paulson contains a
  884.     small first-order theorem prover.
  885.  
  886.     Paulson also has a good chapter on writing theorem provers in ML in
  887.     "Handbook of logic in computer science",
  888.     Edited by:  S. Abramsky, Dov M. Gabbay, and T.S.E. Maibaum.
  889.     Oxford : Clarendon Press, 1992-.
  890.     CALL#: QA76 .H2785 1992 
  891.  
  892.    
  893. Others
  894.     We have an automated theorm proving system here at the University
  895.     of Tasmania, but it is still under development, currently
  896.     riddled with bugs and has an obscure "input language"; aside
  897.     from those minor problems, it'd be perfect...
  898.     La Monte H. Yarroll <piggy@hilbert.maths.utas.edu.au>
  899.  
  900.     Edinburgh's Concurrency Workbench and Sussex's Process Algebra
  901.     Mauipulator are also ML systems of note, though neither are
  902.     interactive theorem provers.
  903.  
  904.  
  905. --------------------------------------------------------------------------
  906. 8. Miscellaneous
  907.  
  908. How do I write the Y combinator in SML without using a recursive
  909. definition (i.e. "fun" or "let rec")?
  910.  
  911.     datatype 'a t = T of 'a t -> 'a
  912.  
  913.     val y = fn f => (fn (T x) => (f (fn a => x (T x) a)))
  914.                          (T (fn (T x) => (f (fn a => x (T x) a))))
  915.  
  916. Where can I find an X-Windows interface to SML?
  917.  
  918.     Poly/ML, Poplog/ML, and SML/NJ all come with X-Windows interfaces.
  919.     See the appropriate entries under section 3.  In addition, Poly/ML
  920.     interfaces to the industry standard OSF/Motif toolkit.
  921.  
  922. How do I call a C function from SML/NJ?
  923.  
  924. See the file runtime/cfuns.c for example C functions that are in
  925. the runtime and callable from ML.  You have to enter the function
  926. into a table at the end of the file along with a string.  You use
  927. the function System.Unsafe.CInterace to look up the function, using
  928. the string as the key.  Note that you'll need to convert ML values
  929. to C representations and back.  You'll have to rebuild the compiler
  930. using makeml.
  931.  
  932. How do I get the emacs mode to work with Emacs version 19?
  933.  
  934. Add these three lines at the top of your `sml-init.el' file:
  935. - ----- BEGIN addition
  936. ; emacs 19 doesn't have `make-shell', which sml-shell needs, so get it
  937. ; when necessary.  12 Oct 1993 M-J. Dominus (mjd@saul.cis.upenn.edu)
  938. (autoload 'make-shell "make-shell" "Make and initialize shell buffer for SML." nil)
  939. - ----- END addition
  940.  
  941. They tell emacs to load the file `make-shell.el' when it needs to use
  942. the `make-shell' function.  
  943.  
  944. Then install this file as `make-shell.el' somewhere on your load path,
  945. probably in your emacs `site-lisp' directory:
  946.  
  947.